<template>
  <div>
    <div>
      <table
        width="50%"
        height="50"
        border="0"
        align="center"
        cellpadding="0"
        cellspacing="1"
      >
        <tbody>
          <tr>
            <td width="25%" bgcolor="#f3f3f3">项目名称分类</td>
            <td width="75%" bgcolor="#f3f3f3">
              <input
                name="projectCategoryUpdate.categoryname"
                v-model="projectCategory.categoryname"
                id="categoryname"
                type="text"
                value="java培训研究"
              />
            </td>
          </tr>
          <tr>
            <td bgcolor="#f3f3f3">&nbsp;</td>
            <td bgcolor="#f3f3f3">
              <button @click="updateProject()">修改</button>
            </td>
          </tr>
        </tbody>
      </table>
    </div>
    <div id="container">
      <div id="footer">
        <p>
          <a href="http://www.ascenttech.com.cn/" target="_blank"
            >版权所有：北京亚思晟商务科技有限公司
            &copy;2004-2008|京ICP备05005681</a
          >
        </p>
      </div>
    </div>
  </div>
</template>

<script>
export default {
    data: function() {
return {
            projectCategory: {
                categoryid: '',
                expertid: '',
                categoryname: '',
                repStartTime: '',
                repStopTime: '',
                expStartTime: '',
                expStopTime: ''

            },
            projectCategoryList: ''

        };
},
        mounted(){
            this.projectCategory=JSON.parse(localStorage.getItem("project"));
            console.log(this.projectCategory);
        },
        methods:
            {
                updateProject:function (){
                    this.$axios.post(
                        "http://localhost:8080/api/admin/updateProject",
                        this.projectCategory
                    )
                        .then((resp)=>{
                            console.log(resp.data.code+" "+resp.data.msg);
                            location.href="/declare/admin/showProjectCategorys";
                        })
                }
            }
};
</script>

<style>
</style>